2.4 Hypothesize what is wrong with the following method:
public static boolean isEven (int i)
{
if (i % 2 == 0)
return true;
if (i % 2 != 0)
return false;
} // method isEven
Test your hypothesis by calling this method from a run( ) method. Can a try-block and catch-block
handle the problem? Explain.
 
 
View Solution
 
 
 
<< Back Next >>